// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   Preferences.java

package presenter;

import java.awt.GridLayout;
import javax.swing.*;

public class Preferences extends JFrame
{

    public Preferences(int outX, int outY, int outWidth, int outHeight)
    {
        super("Preferences");
        jp = new JPanel(new GridLayout(3, 4));
        x = new JLabel("Output X");
        y = new JLabel("Output Y");
        width = new JLabel("Output Width");
        height = new JLabel("Output Height");
        outputX = new JTextField();
        outputY = new JTextField();
        outputWidth = new JTextField();
        outputHeight = new JTextField();
        ok = new JButton("Ok");
        cancel = new JButton("Cancel");
        jp.add(x);
        jp.add(outputX);
        jp.add(y);
        jp.add(outputY);
        jp.add(width);
        jp.add(outputWidth);
        jp.add(height);
        jp.add(outputHeight);
        jp.add(new JLabel(" "));
        jp.add(new JLabel());
        jp.add(ok);
        jp.add(cancel);
        outputX.setText((new StringBuilder()).append("").append(outX).toString());
        outputY.setText((new StringBuilder()).append("").append(outY).toString());
        outputWidth.setText((new StringBuilder()).append("").append(outWidth).toString());
        outputHeight.setText((new StringBuilder()).append("").append(outHeight).toString());
        setContentPane(jp);
        setLocation(200, 200);
        setDefaultCloseOperation(2);
        pack();
        setVisible(true);
    }

    public int getOutputX()
    {
        return Integer.parseInt(outputX.getText());
    }

    public int getOutputY()
    {
        return Integer.parseInt(outputY.getText());
    }

    public int getOutputWidth()
    {
        return Integer.parseInt(outputWidth.getText());
    }

    public int getOutputHeight()
    {
        return Integer.parseInt(outputHeight.getText());
    }

    public boolean isOk()
    {
        return okPushed;
    }

    public JButton getOk()
    {
        return ok;
    }

    public JButton getCancel()
    {
        return cancel;
    }

    private JPanel jp;
    private JLabel x;
    private JLabel y;
    private JLabel width;
    private JLabel height;
    private JTextField outputX;
    private JTextField outputY;
    private JTextField outputWidth;
    private JTextField outputHeight;
    private boolean okPushed;
    private JButton ok;
    private JButton cancel;
}
